"
I hold the constasts for Windows messages.
"
Class {
	#name : 'SDL2WindowsMessages',
	#superclass : 'SharedPool',
	#classVars : [
		'DM_POINTERHITTEST',
		'MN_GETHMENU',
		'UNICODE_NOCHAR',
		'WM_ACTIVATE',
		'WM_ACTIVATEAPP',
		'WM_AFXFIRST',
		'WM_AFXLAST',
		'WM_APP',
		'WM_APPCOMMAND',
		'WM_ASKCBFORMATNAME',
		'WM_CANCELJOURNAL',
		'WM_CANCELMODE',
		'WM_CAPTURECHANGED',
		'WM_CHANGECBCHAIN',
		'WM_CHANGEUISTATE',
		'WM_CHAR',
		'WM_CHARTOITEM',
		'WM_CHILDACTIVATE',
		'WM_CLEAR',
		'WM_CLIPBOARDUPDATE',
		'WM_CLOSE',
		'WM_COMMAND',
		'WM_COMMNOTIFY',
		'WM_COMPACTING',
		'WM_COMPAREITEM',
		'WM_CONTEXTMENU',
		'WM_COPY',
		'WM_COPYDATA',
		'WM_CREATE',
		'WM_CTLCOLORBTN',
		'WM_CTLCOLORDLG',
		'WM_CTLCOLOREDIT',
		'WM_CTLCOLORLISTBOX',
		'WM_CTLCOLORMSGBOX',
		'WM_CTLCOLORSCROLLBAR',
		'WM_CTLCOLORSTATIC',
		'WM_CUT',
		'WM_DEADCHAR',
		'WM_DELETEITEM',
		'WM_DESTROY',
		'WM_DESTROYCLIPBOARD',
		'WM_DEVICECHANGE',
		'WM_DEVMODECHANGE',
		'WM_DISPLAYCHANGE',
		'WM_DPICHANGED',
		'WM_DRAWCLIPBOARD',
		'WM_DRAWITEM',
		'WM_DROPFILES',
		'WM_DWMCOLORIZATIONCOLORCHANGED',
		'WM_DWMCOMPOSITIONCHANGED',
		'WM_DWMNCRENDERINGCHANGED',
		'WM_DWMSENDICONICLIVEPREVIEWBITMAP',
		'WM_DWMSENDICONICTHUMBNAIL',
		'WM_DWMWINDOWMAXIMIZEDCHANGE',
		'WM_ENABLE',
		'WM_ENDSESSION',
		'WM_ENTERIDLE',
		'WM_ENTERMENULOOP',
		'WM_ENTERSIZEMOVE',
		'WM_ERASEBKGND',
		'WM_EXITMENULOOP',
		'WM_EXITSIZEMOVE',
		'WM_FONTCHANGE',
		'WM_GESTURE',
		'WM_GESTURENOTIFY',
		'WM_GETDLGCODE',
		'WM_GETFONT',
		'WM_GETHOTKEY',
		'WM_GETICON',
		'WM_GETMINMAXINFO',
		'WM_GETOBJECT',
		'WM_GETTEXT',
		'WM_GETTEXTLENGTH',
		'WM_GETTITLEBARINFOEX',
		'WM_HANDHELDFIRST',
		'WM_HANDHELDLAST',
		'WM_HELP',
		'WM_HOTKEY',
		'WM_HSCROLL',
		'WM_HSCROLLCLIPBOARD',
		'WM_ICONERASEBKGND',
		'WM_IME_CHAR',
		'WM_IME_COMPOSITION',
		'WM_IME_COMPOSITIONFULL',
		'WM_IME_CONTROL',
		'WM_IME_ENDCOMPOSITION',
		'WM_IME_KEYDOWN',
		'WM_IME_KEYLAST',
		'WM_IME_KEYUP',
		'WM_IME_NOTIFY',
		'WM_IME_REQUEST',
		'WM_IME_SELECT',
		'WM_IME_SETCONTEXT',
		'WM_IME_STARTCOMPOSITION',
		'WM_INITDIALOG',
		'WM_INITMENU',
		'WM_INITMENUPOPUP',
		'WM_INPUT',
		'WM_INPUTLANGCHANGE',
		'WM_INPUTLANGCHANGEREQUEST',
		'WM_INPUT_DEVICE_CHANGE',
		'WM_KEYDOWN',
		'WM_KEYFIRST',
		'WM_KEYLAST',
		'WM_KEYUP',
		'WM_KILLFOCUS',
		'WM_LBUTTONDBLCLK',
		'WM_LBUTTONDOWN',
		'WM_LBUTTONUP',
		'WM_MBUTTONDBLCLK',
		'WM_MBUTTONDOWN',
		'WM_MBUTTONUP',
		'WM_MDIACTIVATE',
		'WM_MDICASCADE',
		'WM_MDICREATE',
		'WM_MDIDESTROY',
		'WM_MDIGETACTIVE',
		'WM_MDIICONARRANGE',
		'WM_MDIMAXIMIZE',
		'WM_MDINEXT',
		'WM_MDIREFRESHMENU',
		'WM_MDIRESTORE',
		'WM_MDISETMENU',
		'WM_MDITILE',
		'WM_MEASUREITEM',
		'WM_MENUCHAR',
		'WM_MENUCOMMAND',
		'WM_MENUDRAG',
		'WM_MENUGETOBJECT',
		'WM_MENURBUTTONUP',
		'WM_MENUSELECT',
		'WM_MOUSEACTIVATE',
		'WM_MOUSEFIRST',
		'WM_MOUSEHOVER',
		'WM_MOUSEHWHEEL',
		'WM_MOUSELAST',
		'WM_MOUSELEAVE',
		'WM_MOUSEMOVE',
		'WM_MOUSEWHEEL',
		'WM_MOVE',
		'WM_MOVING',
		'WM_NCACTIVATE',
		'WM_NCCALCSIZE',
		'WM_NCCREATE',
		'WM_NCDESTROY',
		'WM_NCHITTEST',
		'WM_NCLBUTTONDBLCLK',
		'WM_NCLBUTTONDOWN',
		'WM_NCLBUTTONUP',
		'WM_NCMBUTTONDBLCLK',
		'WM_NCMBUTTONDOWN',
		'WM_NCMBUTTONUP',
		'WM_NCMOUSEHOVER',
		'WM_NCMOUSELEAVE',
		'WM_NCMOUSEMOVE',
		'WM_NCPAINT',
		'WM_NCPOINTERDOWN',
		'WM_NCPOINTERUP',
		'WM_NCPOINTERUPDATE',
		'WM_NCRBUTTONDBLCLK',
		'WM_NCRBUTTONDOWN',
		'WM_NCRBUTTONUP',
		'WM_NCXBUTTONDBLCLK',
		'WM_NCXBUTTONDOWN',
		'WM_NCXBUTTONUP',
		'WM_NEXTDLGCTL',
		'WM_NEXTMENU',
		'WM_NOTIFY',
		'WM_NOTIFYFORMAT',
		'WM_NULL',
		'WM_PAINT',
		'WM_PAINTCLIPBOARD',
		'WM_PAINTICON',
		'WM_PALETTECHANGED',
		'WM_PALETTEISCHANGING',
		'WM_PARENTNOTIFY',
		'WM_PASTE',
		'WM_PENWINFIRST',
		'WM_PENWINLAST',
		'WM_POINTERACTIVATE',
		'WM_POINTERCAPTURECHANGED',
		'WM_POINTERDEVICECHANGE',
		'WM_POINTERDEVICEINRANGE',
		'WM_POINTERDEVICEOUTOFRANGE',
		'WM_POINTERDOWN',
		'WM_POINTERENTER',
		'WM_POINTERHWHEEL',
		'WM_POINTERLEAVE',
		'WM_POINTERUP',
		'WM_POINTERUPDATE',
		'WM_POINTERWHEEL',
		'WM_POWER',
		'WM_POWERBROADCAST',
		'WM_PRINT',
		'WM_PRINTCLIENT',
		'WM_QUERYDRAGICON',
		'WM_QUERYENDSESSION',
		'WM_QUERYNEWPALETTE',
		'WM_QUERYOPEN',
		'WM_QUERYUISTATE',
		'WM_QUEUESYNC',
		'WM_QUIT',
		'WM_RBUTTONDBLCLK',
		'WM_RBUTTONDOWN',
		'WM_RBUTTONUP',
		'WM_RENDERALLFORMATS',
		'WM_RENDERFORMAT',
		'WM_SETCURSOR',
		'WM_SETFOCUS',
		'WM_SETFONT',
		'WM_SETHOTKEY',
		'WM_SETICON',
		'WM_SETREDRAW',
		'WM_SETTEXT',
		'WM_SETTINGCHANGE',
		'WM_SHOWWINDOW',
		'WM_SIZE',
		'WM_SIZECLIPBOARD',
		'WM_SIZING',
		'WM_SPOOLERSTATUS',
		'WM_STYLECHANGED',
		'WM_STYLECHANGING',
		'WM_SYNCPAINT',
		'WM_SYSCHAR',
		'WM_SYSCOLORCHANGE',
		'WM_SYSCOMMAND',
		'WM_SYSDEADCHAR',
		'WM_SYSKEYDOWN',
		'WM_SYSKEYUP',
		'WM_TABLET_FIRST',
		'WM_TABLET_LAST',
		'WM_TCARD',
		'WM_THEMECHANGED',
		'WM_TIMECHANGE',
		'WM_TIMER',
		'WM_TOUCH',
		'WM_TOUCHHITTESTING',
		'WM_UNDO',
		'WM_UNICHAR',
		'WM_UNINITMENUPOPUP',
		'WM_UPDATEUISTATE',
		'WM_USER',
		'WM_USERCHANGED',
		'WM_VKEYTOITEM',
		'WM_VSCROLL',
		'WM_VSCROLLCLIPBOARD',
		'WM_WINDOWPOSCHANGED',
		'WM_WINDOWPOSCHANGING',
		'WM_WININICHANGE',
		'WM_WTSSESSION_CHANGE',
		'WM_XBUTTONDBLCLK',
		'WM_XBUTTONDOWN',
		'WM_XBUTTONUP'
	],
	#category : 'OSWindow-SDL2-Bindings',
	#package : 'OSWindow-SDL2',
	#tag : 'Bindings'
}

{ #category : 'class initialization' }
SDL2WindowsMessages class >> initialize [

"Spliting the initialization of constants.
The Pharo 9 bootstrap is still building the image first in V3 bytecode and the number of literals is limited.
These methods can be inlined when V3 bytecode is left behind in the bootstrap."

	self
		initializeVariablesSet1;
		initializeVariablesSet2;
		initializeVariablesSet3;
		initializeVariablesSet4;
		initializeVariablesSet5;
		initializeVariablesSet6;
		initializeVariablesSet7
]

{ #category : 'private - initialization' }
SDL2WindowsMessages class >> initializeVariablesSet1 [

	WM_NULL := 0.
	WM_CREATE := 1.
	WM_DESTROY := 2.
	WM_MOVE := 3.
	WM_SIZE := 5.
	WM_ACTIVATE := 6.
	WM_SETFOCUS := 7.
	WM_KILLFOCUS := 8.
	WM_ENABLE := 10.
	WM_SETREDRAW := 11.
	WM_SETTEXT := 12.
	WM_GETTEXT := 13.
	WM_GETTEXTLENGTH := 14.
	WM_PAINT := 15.
	WM_CLOSE := 16.
	WM_QUERYENDSESSION := 17.
	WM_QUERYOPEN := 19.
	WM_ENDSESSION := 22.
	WM_QUIT := 18.
	WM_ERASEBKGND := 20.
	WM_SYSCOLORCHANGE := 21.
	WM_SHOWWINDOW := 24.
	WM_WININICHANGE := 26.
	WM_SETTINGCHANGE := 26.
	WM_DEVMODECHANGE := 27.
	WM_ACTIVATEAPP := 28.
	WM_FONTCHANGE := 29.
	WM_TIMECHANGE := 30.
	WM_CANCELMODE := 31.
	WM_SETCURSOR := 32.
	WM_MOUSEACTIVATE := 33.
	WM_CHILDACTIVATE := 34.
	WM_QUEUESYNC := 35.
	WM_GETMINMAXINFO := 36.
	WM_PAINTICON := 38.
	WM_ICONERASEBKGND := 39.
	WM_NEXTDLGCTL := 40.
	WM_SPOOLERSTATUS := 42.
	WM_DRAWITEM := 43.
	WM_MEASUREITEM := 44.
	WM_DELETEITEM := 45.
	WM_VKEYTOITEM := 46.
	WM_CHARTOITEM := 47.
	WM_SETFONT := 48.
	WM_GETFONT := 49.
	WM_SETHOTKEY := 50.
	WM_GETHOTKEY := 51.
	WM_QUERYDRAGICON := 55.
	WM_COMPAREITEM := 57.
	WM_GETOBJECT := 61.
	WM_COMPACTING := 65.
	WM_COMMNOTIFY := 68.
	WM_WINDOWPOSCHANGING := 70.
	WM_WINDOWPOSCHANGED := 71.
	WM_POWER := 72.
	WM_COPYDATA := 74.
	WM_CANCELJOURNAL := 75.
	WM_NOTIFY := 78.
	WM_INPUTLANGCHANGEREQUEST := 80.
	WM_INPUTLANGCHANGE := 81.
	WM_TCARD := 82.
	WM_HELP := 83.
	WM_USERCHANGED := 84.
	WM_NOTIFYFORMAT := 85
]

{ #category : 'private - initialization' }
SDL2WindowsMessages class >> initializeVariablesSet2 [

	WM_CONTEXTMENU := 123.
	WM_STYLECHANGING := 124.
	WM_STYLECHANGED := 125.
	WM_DISPLAYCHANGE := 126.
	WM_GETICON := 127.
	WM_SETICON := 128.
	WM_NCCREATE := 129.
	WM_NCDESTROY := 130.
	WM_NCCALCSIZE := 131.
	WM_NCHITTEST := 132.
	WM_NCPAINT := 133.
	WM_NCACTIVATE := 134.
	WM_GETDLGCODE := 135.
	WM_SYNCPAINT := 136.
	WM_NCMOUSEMOVE := 160.
	WM_NCLBUTTONDOWN := 161.
	WM_NCLBUTTONUP := 162.
	WM_NCLBUTTONDBLCLK := 163.
	WM_NCRBUTTONDOWN := 164.
	WM_NCRBUTTONUP := 165.
	WM_NCRBUTTONDBLCLK := 166.
	WM_NCMBUTTONDOWN := 167.
	WM_NCMBUTTONUP := 168.
	WM_NCMBUTTONDBLCLK := 169.
	WM_NCXBUTTONDOWN := 171.
	WM_NCXBUTTONUP := 172.
	WM_NCXBUTTONDBLCLK := 173
]

{ #category : 'private - initialization' }
SDL2WindowsMessages class >> initializeVariablesSet3 [

	WM_INPUT_DEVICE_CHANGE := 254.
	WM_INPUT := 255.
	WM_KEYFIRST := 256.
	WM_KEYDOWN := 256.
	WM_KEYUP := 257.
	WM_CHAR := 258.
	WM_DEADCHAR := 259.
	WM_SYSKEYDOWN := 260.
	WM_SYSKEYUP := 261.
	WM_SYSCHAR := 262.
	WM_SYSDEADCHAR := 263.
	WM_UNICHAR := 265.
	WM_KEYLAST := 265.
	UNICODE_NOCHAR := 65535.

	WM_IME_STARTCOMPOSITION := 269.
	WM_IME_ENDCOMPOSITION := 270.
	WM_IME_COMPOSITION := 271.
	WM_IME_KEYLAST := 271.
	WM_INITDIALOG := 272.
	WM_COMMAND := 273.
	WM_SYSCOMMAND := 274.
	WM_TIMER := 275.
	WM_HSCROLL := 276.
	WM_VSCROLL := 277.
	WM_INITMENU := 278.
	WM_INITMENUPOPUP := 279.
	WM_GESTURE := 281.
	WM_GESTURENOTIFY := 282.
	WM_MENUSELECT := 287.
	WM_MENUCHAR := 288.
	WM_ENTERIDLE := 289.
	WM_MENURBUTTONUP := 290.
	WM_MENUDRAG := 291.
	WM_MENUGETOBJECT := 292.
	WM_UNINITMENUPOPUP := 293.
	WM_MENUCOMMAND := 294.
	WM_CHANGEUISTATE := 295.
	WM_UPDATEUISTATE := 296.
	WM_QUERYUISTATE := 297
]

{ #category : 'private - initialization' }
SDL2WindowsMessages class >> initializeVariablesSet4 [

	WM_CTLCOLORMSGBOX := 306.
	WM_CTLCOLOREDIT := 307.
	WM_CTLCOLORLISTBOX := 308.
	WM_CTLCOLORBTN := 309.
	WM_CTLCOLORDLG := 310.
	WM_CTLCOLORSCROLLBAR := 311.
	WM_CTLCOLORSTATIC := 312.
	MN_GETHMENU := 481.
	WM_MOUSEFIRST := 512.
	WM_MOUSEMOVE := 512.
	WM_LBUTTONDOWN := 513.
	WM_LBUTTONUP := 514.
	WM_LBUTTONDBLCLK := 515.
	WM_RBUTTONDOWN := 516.
	WM_RBUTTONUP := 517.
	WM_RBUTTONDBLCLK := 518.
	WM_MBUTTONDOWN := 519.
	WM_MBUTTONUP := 520.
	WM_MBUTTONDBLCLK := 521.
	WM_MOUSEWHEEL := 522.
	WM_XBUTTONDOWN := 523.
	WM_XBUTTONUP := 524.
	WM_XBUTTONDBLCLK := 525.
	WM_MOUSEHWHEEL := 526.
	WM_MOUSELAST := 526.
	WM_PARENTNOTIFY := 528.
	WM_ENTERMENULOOP := 529.
	WM_EXITMENULOOP := 530.
	WM_NEXTMENU := 531.
	WM_SIZING := 532.
	WM_CAPTURECHANGED := 533.
	WM_MOVING := 534.
	WM_POWERBROADCAST := 536.
	WM_DEVICECHANGE := 537.
	WM_MDICREATE := 544.
	WM_MDIDESTROY := 545.
	WM_MDIACTIVATE := 546.
	WM_MDIRESTORE := 547.
	WM_MDINEXT := 548.
	WM_MDIMAXIMIZE := 549.
	WM_MDITILE := 550.
	WM_MDICASCADE := 551.
	WM_MDIICONARRANGE := 552.
	WM_MDIGETACTIVE := 553.
	WM_MDISETMENU := 560.
	WM_ENTERSIZEMOVE := 561.
	WM_EXITSIZEMOVE := 562.
	WM_DROPFILES := 563.
	WM_MDIREFRESHMENU := 564.
	WM_POINTERDEVICECHANGE := 568.
	WM_POINTERDEVICEINRANGE := 569.
	WM_POINTERDEVICEOUTOFRANGE := 570.
	WM_TOUCH := 576.
	WM_NCPOINTERUPDATE := 577.
	WM_NCPOINTERDOWN := 578.
	WM_NCPOINTERUP := 579.
	WM_POINTERUPDATE := 581.
	WM_POINTERDOWN := 582.
	WM_POINTERUP := 583.
	WM_POINTERENTER := 585.
	WM_POINTERLEAVE := 586.
	WM_POINTERACTIVATE := 587.
	WM_POINTERCAPTURECHANGED := 588.
	WM_TOUCHHITTESTING := 589.
	WM_POINTERWHEEL := 590.
	WM_POINTERHWHEEL := 591.
	DM_POINTERHITTEST := 592
]

{ #category : 'private - initialization' }
SDL2WindowsMessages class >> initializeVariablesSet5 [

	WM_IME_SETCONTEXT := 641.
	WM_IME_NOTIFY := 642.
	WM_IME_CONTROL := 643.
	WM_IME_COMPOSITIONFULL := 644.
	WM_IME_SELECT := 645.
	WM_IME_CHAR := 646.
	WM_IME_REQUEST := 648.
	WM_IME_KEYDOWN := 656.
	WM_IME_KEYUP := 657.
	WM_MOUSEHOVER := 673.
	WM_MOUSELEAVE := 675.
	WM_NCMOUSEHOVER := 672.
	WM_NCMOUSELEAVE := 674.
	WM_WTSSESSION_CHANGE := 689
]

{ #category : 'private - initialization' }
SDL2WindowsMessages class >> initializeVariablesSet6 [

	WM_TABLET_FIRST := 704.
	WM_TABLET_LAST := 735.
	WM_DPICHANGED := 736.
	WM_CUT := 768.
	WM_COPY := 769.
	WM_PASTE := 770.
	WM_CLEAR := 771.
	WM_UNDO := 772.
	WM_RENDERFORMAT := 773.
	WM_RENDERALLFORMATS := 774.
	WM_DESTROYCLIPBOARD := 775.
	WM_DRAWCLIPBOARD := 776.
	WM_PAINTCLIPBOARD := 777.
	WM_VSCROLLCLIPBOARD := 778.
	WM_SIZECLIPBOARD := 779.
	WM_ASKCBFORMATNAME := 780.
	WM_CHANGECBCHAIN := 781.
	WM_HSCROLLCLIPBOARD := 782.
	WM_QUERYNEWPALETTE := 783.
	WM_PALETTEISCHANGING := 784.
	WM_PALETTECHANGED := 785.
	WM_HOTKEY := 786.
	WM_PRINT := 791.
	WM_PRINTCLIENT := 792.
	WM_APPCOMMAND := 793.
	WM_THEMECHANGED := 794.
	WM_CLIPBOARDUPDATE := 797.
	WM_DWMCOMPOSITIONCHANGED := 798.
	WM_DWMNCRENDERINGCHANGED := 799
]

{ #category : 'private - initialization' }
SDL2WindowsMessages class >> initializeVariablesSet7 [

	WM_DWMCOLORIZATIONCOLORCHANGED := 800.
	WM_DWMWINDOWMAXIMIZEDCHANGE := 801.
	WM_DWMSENDICONICTHUMBNAIL := 803.
	WM_DWMSENDICONICLIVEPREVIEWBITMAP := 806.
	WM_GETTITLEBARINFOEX := 831.
	WM_HANDHELDFIRST := 856.
	WM_HANDHELDLAST := 863.
	WM_AFXFIRST := 864.
	WM_AFXLAST := 895.
	WM_PENWINFIRST := 896.
	WM_PENWINLAST := 911.
	WM_APP := 32768.
	WM_USER := 1024
]

{ #category : 'querying' }
SDL2WindowsMessages class >> translateId: aNumber [

	^ self classVariables
		  detect: [ :assoc | assoc value = aNumber ]
		  ifFound: [ :assoc | assoc key ]
		  ifNone: [ 'Unknown Message ' , aNumber printString ]
]
